﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using DoAnASP;

public partial class QuanLiThuongHieu : System.Web.UI.Page
{
   

    public void LoadTH()
    {
        BUS_ThuongHieu th = new BUS_ThuongHieu();
        DataTable dt = new DataTable();
        dt = th.Load_Thuonghieu();
        gvThuongHieu.DataSource = dt.DefaultView;
        gvThuongHieu.DataBind();

    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadTH();

    }
   
    protected void Button5_Click(object sender, EventArgs e)
    {

    }
    protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/Admin/QuanLiThuongHieu.aspx");
    }
    protected void btnThemTH_Click(object sender, EventArgs e)
    {
        BUS_ThuongHieu th = new BUS_ThuongHieu();
        bool KT =  th.ThemThuongHieu(txtThuongHieu.Text);
        if (KT == true)
        {
            Session["MaTB"] = 7;
            Response.Redirect("~/ThongBao.aspx");
        }
    }
}